//
//  ViewController.swift
//  HakimSMBDemo
//
//  Created by 范华泽 on 2017/3/17.
//  Copyright © 2017年 Hakim. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var IPAddress: UITextField!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        self.view.backgroundColor = UIColor.white
        
        IPAddress.text = UserDefaults.standard.object(forKey: kLastAddress) as? String
    }
    
    @IBAction func sureButtonClick(_ sender: UIButton) {
        
        let treeVC = TreeViewController()
        treeVC.path = IPAddress.text as String?
        
        UserDefaults.standard.set(IPAddress.text!, forKey: kLastAddress)
        UserDefaults.standard.synchronize()
        
        self.navigationController?.pushViewController(treeVC, animated: true)
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}
